package advancedStreams;

import java.io.Console;

public class ConsoleDemo {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Console cons = System.console();
		String username = cons.readLine("Username: ");
		char[] password = cons.readPassword("Password: ");
		
		System.out.printf("Username: %s %n Password: %s", username, String.valueOf(password));
	}

}
